Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Flip yaw angle for DepthInstance3DBoxes.overlaps #1548

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

filaPro
Copy link
Contributor

@filaPro filaPro commented Jun 9, 2022

Motivation

This fix is separated from FCAF3D PR #1547 after a small discussion with @ZwwWayne.

While working on that PR I've checked my FCAF3D checkpoints for ScanNet, SUN RGB-D and S3DIS from mmdetectiontion3d==0.15.0. And for ScanNet and S3DIS metrics were exactly the same, unlike SUN RGB-D with mAP@0.5 less then expected by ~3%. After some debugging I saw that the model is fine, but the difference is caused by the evaluation function. And basically the difference is in BaseInstance3DBoxes.overlaps. The difference is not that big, i.e. test_indoor_eval successfully passes with this fix and without it. But, maybe it is a bug.

As I understand we call mmcv.ops.box_iou_rotated in BaseInstance3DBoxes.overlaps and this function is designed for anti-clockwise heading angle. So it is probably ok for LidarInstance3DBoxes. But for DepthInstance3DBoxes the yaw angle is clockwise, so we need to flip the angle of boxes1 and boxes1 before calling mmcv.ops.box_iou_rotated.

Also the issue is critical as it has a little affect on indoor_eval and сonsequently on all indoor models. I have tried the VoteNet checkpoint and the affect of this PR is minimal, e.g. <1% . However looks like VoteNet is 15% mAP@0.5 less than it should be in current dev branch. I'm not sure about the reason. May be it should be retrained, or the bug is introduced in nms3d or iou3d refactoring in last 2 months.

Modification

Inherit DepthInstance3DBoxes.overlaps from BaseInstance3DBoxes.overlaps.

BC-breaking

Yes.

@codecov
Copy link

codecov bot commented Jun 9, 2022

Codecov Report

Merging #1548 (b5be2ef) into dev (2ebce28) will decrease coverage by 0.04%.
The diff coverage is 22.22%.

@@            Coverage Diff             @@
##              dev    #1548      +/-   ##
==========================================
- Coverage   50.19%   50.15%   -0.05%     
==========================================
  Files         223      223              
  Lines       19104    19113       +9     
  Branches     3134     3136       +2     
==========================================
- Hits         9590     9586       -4     
- Misses       8935     8948      +13     
  Partials      579      579              
Flag Coverage Δ
unittests 50.15% <22.22%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmdet3d/core/bbox/structures/depth_box3d.py 83.47% <22.22%> (-5.21%) ⬇️
mmdet3d/datasets/pipelines/transforms_3d.py 87.39% <0.00%> (-0.86%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ebce28...b5be2ef. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants